package org.jeecg.modules.monitoring.j_monitoring.entity;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @Description: 虚拟化群集
 * @Author: xiaoyq
 * @Date:   2023-02-23
 * @Version: V1.0
 */
@Data
@TableName("m_gl_virtualization_cluster")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="虚拟化群集", description="虚拟化群集")
public class MGlVirtualizationCluster implements Serializable {
    private static final long serialVersionUID = 1L;

	/**主键id*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键id")
    private java.lang.String id;
	/**群集名称*/
	@Excel(name = "群集名称", width = 15)
    @ApiModelProperty(value = "群集名称")
    private java.lang.String name;
	/**虚拟化软件名称*/
	@Excel(name = "虚拟化软件名称", width = 15, dicCode = "j_rjmc")
	@Dict(dicCode = "j_rjmc")
    @ApiModelProperty(value = "虚拟化软件名称")
    private java.lang.String softwareName;
	/**是否监测*/
	@Excel(name = "是否监测", width = 15, dicCode = "j_sfjc")
	@Dict(dicCode = "j_sfjc")
	@ApiModelProperty(value = "是否监测")
	private String whetherToMonitor;
	/**软件版本*/
	@Excel(name = "软件版本", width = 15)
    @ApiModelProperty(value = "软件版本")
    private java.lang.String softwareVersion;
	/**群集管理IP地址*/
	@Excel(name = "群集管理IP地址", width = 15)
    @ApiModelProperty(value = "群集管理IP地址")
    private java.lang.String ipAddress;
	/**投产时间*/
	@Excel(name = "投产时间", width = 15)
    @ApiModelProperty(value = "投产时间")
    private java.lang.String productionTime;
	/**使用状态*/
	@Excel(name = "使用状态", width = 15, dicCode = "j_syzt")
	@Dict(dicCode = "j_syzt")
    @ApiModelProperty(value = "使用状态")
    private java.lang.String usageStatus;
	/**群集说明*/
	@Excel(name = "群集说明", width = 15)
    @ApiModelProperty(value = "群集说明")
    private java.lang.String clusterDescription;
	/**资源预留百分比*/
	@Excel(name = "资源预留百分比", width = 15)
    @ApiModelProperty(value = "资源预留百分比")
    private java.lang.String percentage;

	/**关联计算资源*/
	@Excel(name = "关联计算资源", width = 15)
    @ApiModelProperty(value = "关联计算资源")
	@TableField(exist = false)
	@Dict(dictTable = "m_gl_computing_resource",dicCode = "cluster_id",dicText = "concat_ws(name,device_ip)",valueField = "id",aggregateStatment = " ")
    private java.lang.String computingResources;

	/**关联计算资源*/
	@ApiModelProperty(value = "关联计算资源Id")
	@TableField(exist = false)
	//@Dict(dictTable = "m_gl_computing_resource",dicCode = "cluster_id",dicText = "concat_ws(id)",valueField = "id",aggregateStatment = " ")
	private java.lang.String computingResourcesId;

	/**关联计算资源数量*/
//	@Dict(dictTable = "m_gl_computing_resource",dicCode = "cluster_id",dicText = "count(1)",valueField = "id", aggregateStatment = "group by cluster_id",defaultValue = "0")
	@ApiModelProperty(value = "关联计算资源数量")
	@TableField(exist = false)
	private java.lang.String computingResourcesNum;

	/**关联存储*/
	@Excel(name = "关联存储", width = 40)
	@ApiModelProperty(value = "关联存储")
	@TableField(exist = false)
	//@Dict(dictTable = "m_gl_storage_resources",dicCode = "id",dicText = "concat_ws('',name,' 型号:',model,' 管理IP:',device_ip,' 机柜:',cabinet,' U位:',use_u_q,'~',use_u_h)")
	private java.lang.String associatedStorage;

	@ApiModelProperty(value = "关联存储Name")
	//@Dict(dictTable = "m_gl_storage_resources",dicCode = "id",dicText = "concat_ws('',name,' 型号:',model,' 管理IP:',device_ip,' 机柜:',cabinet,' U位:',use_u_q,'~',use_u_h)")
	@TableField(exist = false)
	private java.lang.String associatedStorageId;

	/**关联存储数量*/
	@ApiModelProperty(value = "关联存储数量")
	@TableField(exist = false)
	//@Dict(dictTable = "m_gl_storage_resources",dicCode = "cluster_id",dicText = "count(1)",valueField = "id", aggregateStatment = "group by cluster_id",defaultValue = "0")
	private java.lang.String associatedStorageNum;

	/**关联虚拟机数量*/
	@ApiModelProperty(value = "关联虚拟机数量")
	@TableField(exist = false)
	private java.lang.String virtualMachineNum;

	/**关联应用*/
	@Excel(name = "关联应用", width = 15)
    @ApiModelProperty(value = "关联应用")
    private java.lang.String associatedApplication;

	@ApiModelProperty(value = "cpu容量")
	@TableField(exist = false)
	private BigDecimal cpuCapacity;

	@ApiModelProperty(value = "内存容量")
	private java.lang.String memoryCapacity;

	@ApiModelProperty(value = "存储容量")
	private java.lang.String storageCapacity;


	@ApiModelProperty(value = "已分配cpu核数")
	@TableField(exist = false)
	private BigDecimal usedCpu;

	@ApiModelProperty(value = "已分配内存数量")
	@TableField(exist = false)
	private BigDecimal usedMemory;

	@ApiModelProperty(value = "已分配存储容量")
	@TableField(exist = false)
	private BigDecimal usedStorage;

//	@TableField(exist = false)
//	@ApiModelProperty(value = "物理机数量")
//	private java.lang.Integer physicalMachinesNum;

	@TableField(exist = false)
	@ApiModelProperty(value = "应用数量")
	private java.lang.Integer applicationsNum;


	@TableField(exist = false)
	private Boolean isMonitor = false;

	private String monitorStatus;

	/**责任人*/
	@Excel(name = "责任人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
	@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
	@ApiModelProperty(value = "责任人")
	private String personLiable;

	@ApiModelProperty(value = "责任人id")
	private java.lang.String personLiableId;

	/**备注*/
	@Excel(name = "备注", width = 15)
	@ApiModelProperty(value = "备注")
	private java.lang.String remarks;

	/**创建时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@ApiModelProperty(value = "创建时间")
	private java.util.Date createTime;

	/**更新时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@ApiModelProperty(value = "更新时间")
	private java.util.Date updateTime;

	/**创建人*/
	@ApiModelProperty(value = "创建人")
	private java.lang.String createBy;

	/**更新人*/
	@ApiModelProperty(value = "更新人")
	private java.lang.String updateBy;

	@TableField(exist = false)
	private int hostNum;

	@TableField(exist = false)
	private int machineNum;

	@TableField(exist = false)
	private int openNum;

	@TableField(exist = false)
	private int cpuKernelNum;
}
